class Eth::Contracts::ContributionController < ApplicationController
  protect_from_forgery :except => :index

  def index
  end

  def pause
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.pause
    else
      msg = Contribution.pause(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_pause => msg)
  end

  def funding_start_time
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.fundingStartTime
    else
      msg = Contribution.fundingStartTime(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_funding_start_time => msg)
  end

  def day_cycle
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.dayCycle
    else
      msg = Contribution.dayCycle(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_day_cycle => msg)
  end

  def user_buys
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.userBuys
    else
      msg = Contribution.userBuys(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_user_buys => msg)
  end

  def total_contributed_eth
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.totalContributedETH
    else
      msg = Contribution.totalContributedETH(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_total_contributed_eth => msg)
  end

  def kill
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.kill
    else
      msg = Contribution.kill(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_kill => msg)
  end

  def finalize
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.finalize
    else
      msg = Contribution.finalize(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_finalize => msg)
  end

  def min_fund
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.MIN_FUND
    else
      msg = Contribution.MIN_FUND(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_min_fund => msg)
  end

  def crawdsale_end_day
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.CRAWDSALE_END_DAY
    else
      msg = Contribution.CRAWDSALE_END_DAY(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_crawdsale_end_day => msg)
  end

  def is_finalize
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.isFinalize
    else
      msg = Contribution.isFinalize(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_is_finalize => msg)
  end

  def accept_ownership
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.acceptOwnership
    else
      msg = Contribution.acceptOwnership(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_accept_ownership => msg)
  end

  def daily_totals
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.dailyTotals
    else
      msg = Contribution.dailyTotals(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_daily_totals => msg)
  end

  def owner
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.owner
    else
      msg = Contribution.owner(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_owner => msg)
  end

  def change_owner
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.changeOwner
    else
      msg = Contribution.changeOwner(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_change_owner => msg)
  end

  def eth_fund_deposit
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.ethFundDeposit
    else
      msg = Contribution.ethFundDeposit(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_eth_fund_deposit => msg)
  end

  def crawdsale_start_day
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.CRAWDSALE_START_DAY
    else
      msg = Contribution.CRAWDSALE_START_DAY(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_crawdsale_start_day => msg)
  end

  def today
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.today
    else
      msg = Contribution.today(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_today => msg)
  end

  def new_owner
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.newOwner
    else
      msg = Contribution.newOwner(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_new_owner => msg)
  end

  def investor_deposit
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.investorDeposit
    else
      msg = Contribution.investorDeposit(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_investor_deposit => msg)
  end

  def is_pause
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Contribution.isPause
    else
      msg = Contribution.isPause(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_is_pause => msg)
  end

end
